﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" CodeFile="StatAppraise.aspx.cs" Inherits="Manage_StatAppraise" %>
<%@ Register Src="~/Manage/CmsMessageBox.ascx" TagName="MessageBox" TagPrefix="cms" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        td.TeacherTreeTD table tr 
        {
            height: 12px;
        }
        
        td.TeacherTreeTD table tr td
        {
            padding: 0px;
            margin: 0px;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#<%=Export.ClientID %>, #<%=Export2.ClientID %>').click(function () {
                var count = $('#<%=Teachers.ClientID %> :checked').size();
                if (count == 0) {
                    alert('请选择教师信息。');

                    return false;
                } 

                return true;
            });


            $('DIV#<%=Teachers.ClientID %> :checkbox').click(function () {
                var status = $(this).attr('checked');
                var cid = $(this).attr('id');

                var childid = cid.replace('CheckBox', 'Nodes');

                if (status == 'checked') {
                    $('div#' + childid + ' :checkbox').attr('checked', 'checked');
                } else {
                    $('div#' + childid + ' :checkbox').removeAttr('checked');
                }
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="body" Runat="Server">
    <cms:MessageBox ID="MessageBox" runat="server" />
    <table class="Info" cellspacing="1">
        <tr>
            <td align="right" style="width: 100px">开始时间：</td>
            <td align="center">
                <asp:DropDownList ID="Year1" runat="server"></asp:DropDownList>年<asp:DropDownList ID="Month1" runat="server"></asp:DropDownList>月<asp:DropDownList ID="Day1" runat="server"></asp:DropDownList>日
            </td>
        </tr>
        <tr>
            <td align="right">结束时间：</td>
            <td align="center">
                <asp:DropDownList ID="Year2" runat="server"></asp:DropDownList>年<asp:DropDownList ID="Month2" runat="server"></asp:DropDownList>月<asp:DropDownList ID="Day2" runat="server"></asp:DropDownList>日
            </td>
        </tr>
        <tr>
            <td align="right">教师：</td>
            <td align="left" class="TeacherTreeTD">
                <asp:TreeView ID="Teachers" runat="server" ShowCheckBoxes="All" ShowLines="True">
                </asp:TreeView>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="Export" runat="server" Text="详细统计" 
                     CssClass="Button" onclick="Export_Click" />&nbsp;&nbsp;
                <asp:Button ID="Export2" runat="server" Text="汇总统计" 
                     CssClass="Button" onclick="Export2_Click"/>
            </td>
        </tr>
    </table>
</asp:Content>